package cn.tedu.oop;

public class Test6_Extends {
    public static void main(String[] args) {
        new Dog().eat();
        new Dog().sleep();
        System.out.println(new Dog().name);
    }
}
class God{
    String name;
}
class Animal extends God{
    private double sifangmoney = 100;

    public void eat(){
        System.out.println("啥都吃");
    }
}
class Dog extends Animal{
    public void sleep(){
        System.out.println("sleep()...");
    }
}
class Cat{

}